Skip to content

Merge dev update to main: RAG agent/graph for XANES, memory/database, evaluation#112

Open
tdpham2 wants to merge 86 commits intomainfrom
dev
Open

Merge dev update to main: RAG agent/graph for XANES, memory/database, evaluation#112
tdpham2 wants to merge 86 commits intomainfrom
dev

Conversation

@tdpham2
Copy link
Copy Markdown
Collaborator

@tdpham2 tdpham2 commented Apr 17, 2026

Summary

Major improvements for ChemGraph:

tdpham2 and others added 30 commits March 10, 2026 12:32
Add session memory persistence with CLI session management.
Add evaluation & benchmarking module with LLM-as-judge and documentation
Add OpenCode MCP configuration for using ChemGraph tools directly
Add missing evaluation documentations and update config.toml
@tdpham2
Copy link
Copy Markdown
Collaborator Author

tdpham2 commented Apr 17, 2026

@keceli I will keep this PR open for now so I can track the major changes before asking you to review it.

@tdpham2 tdpham2 changed the title Merge recent update to main: RAG agent/graph for XANES, memory/database, evaluation Merge dev update to main: RAG agent/graph for XANES, memory/database, evaluation Apr 17, 2026
@tdpham2 tdpham2 self-assigned this Apr 17, 2026
tdpham2 and others added 15 commits April 22, 2026 10:48
… logging/config bugs

- Move CLI from src/ui/cli.py to src/chemgraph/cli/ (main.py, commands.py, formatting.py)
- Extract shared async helper into chemgraph.utils.async_utils
- Update pyproject.toml entry point: ui.cli:main -> chemgraph.cli:main
- Merge supported_argoproxy_models into supported_argo_models with argo: prefix
- Switch Groq to prefix-based routing (groq:<model>) instead of curated list
- Add ALCF model support with Globus OAuth auth flow and default base URL
- Fix logging to use stderr instead of stdout (critical for MCP stdio transport)
- Add configure_logging() for package-wide verbosity control (-v/-vv flags)
- Replace bare print() debug statements with proper logger calls
- Add --base-url CLI flag and workflow aliases (python_repl -> python_relp)
- Use ThreadPoolExecutor for cross-platform timeout instead of Unix signals
- Add default section merging to config loader so partial configs don't crash
- Add [api.alcf] config section and DEPLOYMENT.md
- Add dependency_tests.yml CI workflow
- anthropic.py: Replace all OpenAI references with Anthropic in logs,
  prompts, docstring, and critically fix env var from OPENAI_API_KEY
  to ANTHROPIC_API_KEY so auth retry actually works
- openai.py: Fix argo:gpt-5.4 wire name from 'gpt52' to 'gpt54'
Refactor CLI, unify model routing, and fix logging/config bugs
… logic

- Rewrite multi_agent.py with LangGraph Send() pattern for parallel
  executor fan-out (Planner -> Send(executor_subgraph) -> Planner)
- Replace sequential worker loop with independent executor subgraphs
  that each run a ReAct loop (executor_agent -> ToolNode -> executor_agent)
- Add retry logic with error feedback for planner and response agent
  JSON parsing failures
- Reduce multi_agent_mcp.py to a thin wrapper delegating to
  construct_multi_agent_graph (ToolNode handles MCP tools natively)
- Rename formatter_max_retries to max_retries for consistency
- Update PlannerResponse schema, state definitions (ExecutorState,
  PlannerState), and multi-agent prompts for new architecture
- Update single_agent.py and ase_tools.py
- Update tests for new schemas and add planner fallback retry tests
…gent

Since LangGraph's ToolNode handles both sync LangChain tools and async
MCP tools natively, the separate multi_agent_mcp workflow is redundant.
The multi_agent workflow now works identically with MCP tools passed
via the tools parameter.

- Delete src/chemgraph/graphs/multi_agent_mcp.py
- Remove multi_agent_mcp import, workflow_map entry, and dispatch
  branch from llm_agent.py
- Remove from CLI workflow choices and eval config valid types
- Remove from test_graphs.py and test_graph_constructors.py
- Update docs/evaluation.md and SKILL.md workflow tables
Replace duplicated MCP server code in example scripts with references
to the canonical chemgraph.mcp.mcp_tools module. This eliminates ~960
lines of duplicated tool definitions that were drifting out of sync.

- Delete scripts/mcp_example/mcp_stdio/mcp_tools_stdio.py (484 lines)
- Replace scripts/mcp_example/mcp_http/start_mcp_server.py (486 lines)
  with a 24-line thin wrapper importing chemgraph.mcp.mcp_tools
- Update stdio run scripts to spawn 'python -m chemgraph.mcp.mcp_tools'
  instead of referencing local server copies
- Add scripts/mcp_example/mcp_stdio/run_chemgraph_multi_agent.py for
  local multi-agent MCP testing using the multi_agent workflow
- Update start_mcp_server.sub to use the module directly
- Update both README files with corrected instructions and port numbers
Refactor multi-agent to Send()-based architecture, remove multi_agent_mcp, and clean up MCP examples
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants